#ifndef _FIO66_LOGGER_H_
#define _FIO66_LOGGER_H_

#include <string_view>

#include <glog/logging.h>

#define DISALLOW_COPY_AND_ASSIGN_LOG(ClassName) \
  ClassName(const ClassName&) = delete;      \
  void operator=(const ClassName&) = delete;

#define LOGI LOG(INFO)
#define LOGE LOG(ERROR)
// #define LOGI std::cout
// #define LOGE std::cout
#define LOGW LOG(WARNING)
#define LOGF LOG(FATAL)
#define LOGD DLOG(INFO)

namespace fio66 {
class Fio66Logger {
 public:
  DISALLOW_COPY_AND_ASSIGN_LOG(Fio66Logger)
  static Fio66Logger* GetInstance();

  bool Init(std::string_view client_name);
  void Uninit();

 private:
  Fio66Logger() = default;
  ~Fio66Logger() = default;
};

const char* strerror_tl(int savedErrno);

}  // namespace fio66

#endif  // _FIO66_LOGGER_H_
